import request from "@u/request";

const fetchItems = (params = {}) => {
  return request.get("/getItemLists", { params });
};
// 新增商品
const addItem = (params = {}) => {
  return request.post("/itemAdd", params);
};
// 修改商品
const updateItem = (params = {}) => {
  return request.put("/itemUpdate", params);
};
// 商品商品
const delItem = (id) => {
  return request.delete("/delItem", { params: { id } });
};
// 获取商品详情
const fetchItemDeatil = (id) => {
  return request.get("/getItemDetail", { params: { id } });
};
// 批量新增商品
const addItems = (params = {}) => {
  return request.post("/addItems", params);
};
export { fetchItems, addItem, updateItem, delItem, fetchItemDeatil,addItems };
